package com.xhh.apis.user;

import com.xhh.model.common.dtos.ResponseResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "user-service")
public interface IUserClient {

    /**
     * 获取用户详情
     * @return
     */
    @GetMapping("/user/userInfo")
    ResponseResult getUserInfo();

    @GetMapping("/user/getStudent/{studentCode}")
    @ApiOperation("根据准考证号获取学生信息")
    ResponseResult getStuByCode(@PathVariable("studentCode") String studentCode);

    @GetMapping("/user/getStuById/{studentId}")
    @ApiOperation("根据学生id获取学生信息")
    ResponseResult getStuById(@PathVariable("studentId") Long studentId);

    @GetMapping("/user/getUser/{userId}")
    @ApiOperation("根据学生id获取学生信息")
    ResponseResult getUserById(@PathVariable("userId") Long userId);

    @GetMapping("/user/getSchool/{sId}")
    @ApiOperation("根据招生单位id获取招生单位信息")
    ResponseResult getSchoolById(@PathVariable("sId") Long sId);

    @GetMapping("/user/getStuByUId/{userId}")
    @ApiOperation("根据用户id获取学生信息")
    ResponseResult getStuByUId(@PathVariable("userId") Long userId);
}
